1. Field of the Invention
The present invention relates to an image editing apparatus and, more particularly, to an image editing apparatus which enables an operator to efficiently process and edit various images such as the image of a cut-in illustration, a pattern and so forth.
2. Related Background Art
The current progress in the field of word processors has enabled everybody to produce clean documents with a high degree of printing quality which well compares with that of conventional type printing. This in turn has given a rise to the demand for a facility which enables the user to edit documents together with pattern data such as of cut-in illustrations or figures.
A typical known system for editing pattern images together with document images incorporates drawing commands corresponding to a multiplicity of basic patterns or partial figure data such as a dot, a straight line, a circle, polygons and so forth, and the user drafts the illustration or drawing by making selective use of such drawing commands.
Edition of a portion of an illustration which has been formed already, requires a suitable editing operation such as deletion, movement and replacement of one of the elements of the illustration. Such an editing operation requires processing the whole of the illustration with the result that the operator is burdened heavily, even if only a part of the illustration is to be edited.
To explain in more detail, it is often required that a document, e.g., a letter, contain an illustration which enables the reader to recognize the content at a glance, as in the case of Christmas cards which usually have various attractive illustrations representing greetings. Such an illustration can be formed, in the known system, by suitably combining a plurality of illustration elements. The formation of a complicated illustration often requires that one or more illustration elements be superposed one on another, and there often is a need to edit only the underlying (or inner) element(s) amongst the superposed elements.
It will be very helpful and editing efficiency will be improved appreciably if the operator is allowed to select only the underlying or inner element and to confirm that such element has been selected.
Unfortunately, however, there has been no apparatus having an editing function capable of meeting such a demand.
It is to be pointed out also that the formation of a desired illustration by means of the drawing commands mentioned before requires a high level of skill and, hence, can be conducted only by well-trained persons.
In recent years, there has been remarkable progress in the field of apparatus for forming and editing patterns and images. A typical one of these apparatus makes use of a plurality of pattern elements and the operator forms a desired illustration by suitably selecting and positioning such pattern elements. In some of the apparatus of this type, when there is a need to edit of only one element of the illustration which has been formed already, the operator is required to appoint or select only the pattern element to be edited and to effect the desired editing operation such as correction or movement by a suitable means such as a coordinate input device (digitizer) or a keyboard. This editing operation can be conducted without substantial difficulty provided that the pattern elements are isolated discretely from each other. However, when one or more pattern elements are superposed or arranged in the close proximity to one another, the problem is encountered that, when the operator appoints one of these elements, the apparatus contrary to what is needed by the operator, selects another element superposed on or adjacent to the designated element.
When one of the illustration elements of an illustration image on a display of the apparatus is to be edited or corrected, it is necessary that such illustration element be appointed correctly. In most cases, the appointment of such a specific illustration element is conducted by moving a movable graphic cursor to the position of the designated illustration element in the image displayed on a display device by a suitable coordinate input means such as a mouse or a digitizer, and then inputting an appointing signal by means of a suitable key such as a key provided on a mouse.
This method of appointing a specific illustration element is disadvantageous in that it often fails to enable the operator to recognize which one of the illustration elements has been actually pointed out through a visual check of the image on the display device. In addition, it is not easy correctly to position the graphic cursor to the designated illustration element, particularly when the element has an extremely small size.
A typical example of the known methods for forming a desired illustration by combining a plurality of partial picture data, i.e., illustration elements, will be described hereinbelow.
FIG. 11 is a block diagram showing a typical example of known system for forming and editing illustrations.
The system has a CRT display 1101 on which are displayed various data such as characters, figure patterns and bit patterns. Input of data in the form of characters is conducted through a keyboard, while a mouse 1103 is used as a pointing device for pointing a desired position on the display and for selecting desried item in a menu on the display. The control and processing of the input and output signals are conducted by a microprocessor (referred to as "CPU", hereinunder) 1105 which is connected to the display and the input means though a bus via a crt interface 1107, keyboard interface 1108 and a mouse interface 1109. Programs and data to be used in the processing by the CPU are stored in a main memory 1110 or in a magnetic disk 1111. The main memory 1110 is directly connected to the BUS 1106, while the magnetic disk 1111 is connected to the BUS 1106 through a disk interface 1112.
The partial picture data or the illustration elements representing the basic patterns from which illustrations are to be synthesized are stored before-hand in the main memory 1110 or the magnetic disk 1111. In operation, the partial picture data are transferred to the display while logical computation is conducted with these data in connection with the display, whereby the image of the desired image is synthesized and displayed.
In general, the data displayed on the display is stored in the form of a V-RAM (video RAM) in the memory and is read through the CRT interface 1107 in synchronism with the display on the CRT 1101 so as to be displayed on the display.
The writing of data in V-RAM in the CPU 1105 may be conducted directly or indirectly by sending a command to the CRT interface 1107, and which one of these two types of writing is used does not matter in the present invention.
FIG. 12 shows an example of an illustration formed by synthesizing a plurality of partial picture data. The broken lines in this Figure are not actually displayed but are shown in this Figure for the purpose of showing the regions.
The rectangle shown by a broken line and including a point P.sub.0 on the upper left corner thereof, represents the frame of the display for displaying the illustration. The illustration is composed of a plurality of partial picture data having the respective rectangular regions identified by points P.sub.1 to P.sub.5 on their upper left corners. This illustration is formed by conducting memory allocation and content in a manner shown in FIG. 13. More specifically, the number n of the partial picture data is stored in a memory region 1301. In the illustrated embodiment, the number "5" is stored because the illustration is composed of five partial picture data. A reference numeral 1302 designates an image structure table which is composed of a plurality of display position defining blocks 1302-1 to 1302-n (n being 5 in this case) for defining the positions at which the respective partial pictures are to be displayed. Each display position defining block 1302-i has regions x.sub.i and y.sub.i for storing the x and y coordinates values of the position where the associated partial picture data is to be displayed, a region DOFF.sub.i for storing the initial address of the partial data defining table 1303-i identifying the partial picture data and a region DSEG.sub.i for storing the segment address of the partial data defining table 1303-i. The offset address and the segment address are concepts which are used when there is an ample storage capacity (64 K bytes unit), and a specific address is generated by means of these two addresses.
As will be seen from FIG. 13, each partial data defining table 1303-i has regions for indicating two partial picture data. The first region is for defining the non-transparency definition data 1304-i of the partial picture data, while the second region is for defining display definition data 1305-i. That is, the fourth and fifth words (each word being constituted by two bytes) indicate the initial address where the non-transparency definition data 1304-i is stored, while the ninth and tenth words indicate the initial address of the display definition data 1305-i. The contents of each data definition table 1303-i are shown by 1401 in FIG. 14. As stated before, the initial address of the image data storage region 1402 is stored as the offset address and the segment address at the fourth word (MEM-OFF) and the fifth word (MEM-SEG). The first to third words are used to denote the types of the image data storage area. More specifically, a number which is "word number minus 1", the word number representing the lateral length of the image data with each word having 16 bits, is stored in the region X-L. At the same time, a number which is given by "line number minus 1", the line number representing the vertical length of the image data, is stored in the region Y-L. The sequence of storage of data is determined by conducting lateral scanning along each line starting with the word data containing the left end in a word-by-word fashion over a distance corresponding to (X-L+1) and then commencing scanning of the next line. Thus, the lateral scanning is conducted in a word-by-word fashion. In order to convert the scanning data into dot-based data, S-OFF and E-OFF regions are used in the following manner. The bit Number of the first effective bit in the left-end word and the bit Number of the last effective bit in the right-end word are stored in the regions S-OFF and E-OFF, respectively. The Numbers of the left end bit and the right end bit of each word are represented by 0 (LSB) and 15 (MSB) , respectively.
It is assumed here that the black circle shown in FIG. 15 is to be defined as image data of a size given by NH words in the lateral direction and NV lines in the vertical direction, and also that NS dots from the left end and NE dots from the right end constitute unnecessary data, while the central portion (i.e., the portion not including these end dots) constitute the defining rectangular region, and therefore (NH-1) and (NV-1) are set in the regions X-L and Y-L, respectively, while (NS-1) and (15-EN) are set in the regions S-OFF and E-OFF, respectively.
In this case, the value "1" in the non-transparency definition data 1304-i corresponds to "black", while "0" corresponds to "white". Similarly, "1" and "0" in the display definition data 1305-i correspond to "black" and "white", respectively.
FIG. 16 shows a typical example of a control flow suitable for forming the image (pattern) shown in FIG. 12.
In Step S 1601, whole image data, i.e., the whole area of the frame of display, is cleared. That is, an operation is conducted to turn the whole area in the rectangle 1201 into white.
In Step S 1602, "1" is substituted for i as the initial value, and an increment of i one by one is conducted in Step S 1606. Then, in Step S 1603, a comparison is conducted between the number n of the partial picture data stored in the memory region 1301 and the number i after the increment. When i is equal to or below n, steps S 1604 and S 1605 are followed repeatedly. More specifically, in Step S1604, the non-transparency definition data 1304-i is extracted from the image constitution table with reference to the i-th display definition block and a process is conducted for "cutting out" this data.
More specifically, the non-transparency definition data 1304-i is read out and the developing position P.sub.i is computed on the basis of the values in the regions x.sub.i and y.sub.i in the i-th display definition block. Then, the non-transparency definition data 1304-i read out from this position is inverted and the logical product (AND) of the inverted data and the display frame is obtained. Although the black portions and white portions of the non-transparency definition data 1304-i are represented by "1" and "0", respectively, this is not exclusive and the black and white portions may be represented by "0" and "1", respectively. In such a case, it suffices only to compute the logical product of the non-transparency data 1304-i and the display frame which is inmost cases a V-RAM. Anyway, the above-explained process enables the region on which the partial picture data to be displayed is going to be written (a part or the whole of the partial picture data which was displayed immediately before this operation) to be changed into white blank.
In Step S 1605, the partial picture data 1305-i stored in the position defined by the segment address MEM-SEG and offset address MEM-OFF is read in the white blank position P.sub.i which has been turned into white blank in Step S 1604, and an arithmetic operation is conducted to determine the logical sum (of the read out partial picture data 1305-i and the white blank position). In consequence, only the portion of the partial picture data represented by black is displayed on the same display region.
More specifically, assuming here that data as shown in FIG. 13 have been stored, and assuming here that the coordinates positions of the points P.sub.1 to P.sub.5 are given by (x.sub.1, y.sub.1) to (x.sub.5, y.sub.5) , a horizontally elongated circle is first cut out (but no substantial change takes place because the display frame has been cleared), and the contour of the horizontally-elongated circle is drawn. When this elongated circle is read, the number i is "1". In the next cycle, i.e., when the number i is "2", a diamond-shaped portion is cut-out by the non-transparency definition data 1304-2, with the point P.sub.2 positioned at the left upper corner of the rectangle. In consequence, a diamond-shaped white blank is formed near the right end of the horizontally elongated circle, with a portion of the diamond placed on the elongated circle, as if the white-blanked elongated hole were placed under or inside the white-blanked diamond. When the third partial picture data is read, since the non-transparency data 1304-3 is black only on the outer periphery of a circle, only the circumference of the circle is cut out and is superposed because the surface definition data 305-3 is the same. In consequence, a black circle surrounding a circular white blank is displayed as if superposed on the horizontal elongated circle and the diamond. A white blank square and a white blank trapezoid are displayed in the same manner in sequence. Since the circle in the trapezoid is white in terms of the non-transparency definition data while the triangle in the same is black, the triangle in the trapezoid is shown as a white blank while the circle is shown as a transparent circle through which the underlying portion of the square is visible.
An example of the image forming process has been described, in which the image to be obtained is formed by superposing five partial picture data. Practically, however, drafting of a desired image or illustration requires a good deal of partial raster image data and geometric basic patterns to be assembled together.
It will be seen that a desired figure or illustration is formed on a display screen such as that of a CRT as if a plurality of pieces of configured paper sheet cut out by scissors were glued one on another to form the desired figure. When this "patching" operation has proceeded to a certain degree, it is difficult to alter the partial picture data which is on the "inner or deeper side" of the frame, i.e., which is overlain by a plurality of partial data. The alteration of such a image data, however, will be conducted without difficulty provided that data concerning the sequence of the "patching" of a plurality of partial picture has been stored. With such data, the operator temporarily stops the operation and starts the "patching" operation from the beginning so that he can easily access to the desired partial picture data to effect the required alteration.
This operation, however, requires that the "patching" on the display be commenced from the beginning each time the correction or the alteration is conducted. This operation is laborious, particularly when only a specific partial picture data is to be moved while other, superposed data are to be kept unmoved. In such a case, the designated partial picture data has to be moved bit by bit, requiring building up of the final image after each movment for the purpose of visual check of the final image after each movement. Thus, the operator is required to appoint the specific partial picture data, move the data over s small distance, and wait for the building up of the final image and to repeat these operations until the desired final image is obtained. This operation is quite time-consuming and seriously impairs the efficiency of the editing operation.